package com.other;

import java.util.Scanner;

public class XiaMi {

    public int calDPDScore(String dpdInfo) {
        int maxOverdue = 0, tmp = 0;
        for (char c : dpdInfo.toCharArray()) {
            if (c == 'Y') {
                tmp++;
                maxOverdue = Math.max(maxOverdue, tmp);
            } else {
                maxOverdue = Math.max(maxOverdue, tmp);
                tmp = 0;
            }
        }
        if (maxOverdue > 0 && maxOverdue <= 3) {
            return -10;
        } else if (maxOverdue > 3 && maxOverdue <= 7) {
            return -15;
        } else if (maxOverdue > 7) {
            return -25;
        }
        return 0;
    }


    public static void main(String[] args) {
        XiaMi xiaMi = new XiaMi();
        System.out.println(xiaMi.calDPDScore("YYY"));
    }
}
